Accusoft.FSInvoices1.Net
Understanding FormResult

In FormSuite for Invoices, a set of image files representing an invoice document is processed with a call to Accusoft.FSInvoices.Processor.Analyze(…) which returns an AnalyzeResults class. An invoice document may consist of one or more image files. For example, an invoice document may have one image file for each physical printed page. AnalyzeResults has two members, List<FormResult> FormResults and List<AnalyzeError> Errors. If there are any errors in the report (i.e. AnalyzeResults), they will be listed in AnalyzeError with references linking the error to the page (image File) in which they error occurred. The resulting data will be in the FormsResults list. Each FormResult is document centric and contains all the information for all the pages of an invoice document.

The data you want to extract from FormSuite for Invoices has been collected into the FormResults list of AnalyzeResults. Each FormResult contains the data found on all the pages of an invoice document. Each FormResult is composed of two types of data, Form Fields and Form Tables, each in a list format.

Form Fields

Form Fields are defined in FormFieldDefinitions.  A FormField is composed of a:

Name The name is as defined in FormDefinition
Label FormFieldLabel class. The information on the page that FormSuite for Invoices has identified as the alias as defined in FormDefinition. You may define new labels.
Examples of actual information on a page that could be identified as a label are:
"Due Date", "Pay By", or "Remit Date" would all be the identifiers for a Due Date label.
Data The information on the page FormSuite for Invoices has identified as the actual data associated with the Label.
Examples:
"$100.00" :  For labels like Invoice Total, Tax, and other labels requiring a currency value.
"1/13/2014" : For labels like Invoice Date, Due Date, and other labels requiring a date value.

FormTables

Tables is a list of FormTable elements. Each FormTable is a table extracted from the image files being processed. A table may be divided across several printed pages of an invoice, but its FormResult will be defined as one table. In FormResult, a FormTable is not a rendering of a table found in an image file or even a set of image files, it is a regenerated model of these tables. Because it is a regenerated model, you have the ability to define what columns and rows to use in the regeneration. In a physical sense, a FormTable is nothing more than a two dimensional array of cells. The top row of cells are referred to as Table Column Headers and the other rows of cells are referred to as Table Rows.

Multipage Results

FormResult may contain multiple pages. These pages are referenced in the FormResult.Document which is list of DocumentPage. The items DocumentPageFormField.DataFormField.Label and FormTableCell all have the following members:

FileId The File identifier associated with the image containing the particular item.
FilePageIndex Is the page index into the file containing the particular item. These indexes are zero based. The first page is index zero, the second page is index one, and so on.
DocumentPageIndex Is the index of the page within the FormResult.Document containing the particular item.  This index is zero based. The DocumentPage class does not have this member.

An application can determine which file and image page to load for display using these members.


 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback